<?php 
      echo $this->Html->css("chosen");
      echo $this->Html->css("dataTables");
      echo $this->Html->css("validationEngine.jquery");
 ?>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/dataTables.min.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/customInput.jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/chosen.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/zice.custom1.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/ColVis.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/accounting.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/layout_table.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/manager_retail_wh_status.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.validationEngine.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.validationEngine-vi.js"></script>
<script type="text/javascript" src="<?php echo $this->webroot; ?>js/jquery.autotab.js"></script>

<div class="titlePage">
<h1>Quản lý kho lẻ - Hiện trạng kho</h1>
</div>
<?php
	if(isset($_GET['tab']))
	{
		$tab = $_GET['tab'];
		echo "<input id='tab' type='hidden' value='".$tab."'/>";
	}
	else 
	{
		echo "<input id='tab' type='hidden'value='0'/>";
	}
?>
<div class="onecolumn">
	<div class="header">
		<span><span class="ico gray spreadsheet"></span>Hàng hóa trong kho</span>
	</div>
	<div class=" clear"></div>
	<div class="content">
		<div id="uploadTab">
                      <ul class="tabs" >
                          <li ><a href="#tab1"   >   Tất cả sản phẩm  </a></li>  
                          <li ><a href="#tab2"   >   Sản phẩm hết hàng  </a></li>  
                          <li ><a href="#tab3"   >   Sản phẩm chưa thêm giá  </a></li>          
                      </ul>
                      <div class="tab_container" >
                      	<div id="tab1" class="tab_content"> 
                            <div class="load_page">
                            	<form id="validation">
									<div class="tableName toolbar">
										<table class="display data_table2 listAllProductRe" >
											<thead>
												<tr>
													<th><div class="th_wrapp">Tên hàng</div></th>
													<th><div class="th_wrapp">Giá bán</div></th>
													<th><div class="th_wrapp">Số lượng</div></th>
													<th><div class="th_wrapp">Quản lý</div></th>
												</tr>
											</thead>
											<tbody>
											<?php 
												foreach ($list_all_product as $item) {
											?>
													<tr class="odd gradeX editWh" id="<?php echo $item['p']['id'].'_edit'?>">
								      					<td><?php  echo $item['p']['name']; ?></td>
								      					<td class='editPrice'><div class='old_price formatMoney'><?php  echo $item['p']['price_retail'];?></div>
								      						<input id="<?php echo $item['p']['id'].'_edit_p'?>" value ="<?php echo $item['p']['price_retail'];?>" class='validate[required,min[1]] tmp_price' style="display: none"/>
								      					</td>
								      					<td><?php  echo $item['p']['quantity_retail'];?></td>
								      					<td >
							                                <span class='btnEdit'>
							                                      <a  title="Edit" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/pencil.png" >
							                                      </a>
							                                 </span> 
							                                 <span class="tip btnDelete" >
							                                       <a title="Delete"  >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/delete.png" >
							                                       </a>
							                                </span> 
							                                <span class='btnSave' style="display: none">
							                                      <a  title="Save" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/checkmark2.png" >
							                                      </a>
							                                 </span>
							                                 <span class='btnCancel' style="display: none">
							                                      <a  title="Cancel" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/cross.png" >
							                                      </a>
							                                 </span>
							                            </td>
		      										</tr><?php }?>
											</tbody>
										</table>
						            </div>
								</form>
                            </div>
                      	</div>
                      	<div id="tab2" class="tab_content"> 
                            <div class="load_page">
                            	<form id="validation">
									<div class="tableName toolbar">
										<table class="display data_table2 listProductOutOfStockRe" >
											<thead>
												<tr>
													<th><div class="th_wrapp">Tên hàng</div></th>
													<th><div class="th_wrapp">Giá bán</div></th>
													<th><div class="th_wrapp">Số lượng</div></th>
													<th><div class="th_wrapp">Quản lý</div></th>
												</tr>
											</thead>
											<tbody>
											<?php 
												foreach ($list_product_out_of_stock as $item) {
											?>
													<tr class="odd gradeX editWh" id="<?php echo $item['p']['id'].'_edit'?>">
								      					<td><?php  echo $item['p']['name']; ?></td>
								      					<td class='editPrice'><div class='old_price formatMoney'><?php  echo $item['p']['price_retail'];?></div>
								      						<input id="<?php echo $item['p']['id'].'_edit_p'?>" value ="<?php echo $item['p']['price_retail'];?>" class='validate[required,min[1]] tmp_price' style="display: none"/>
								      					</td>
								      					<td><?php  echo $item['p']['quantity_retail'];?></td>
								      					<td >
							                                <span class='btnEdit'>
							                                      <a  title="Edit" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/pencil.png" >
							                                      </a>
							                                 </span> 
							                                 <span class="tip btnDelete" >
							                                       <a title="Delete"  >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/delete.png" >
							                                       </a>
							                                </span> 
							                                <span class='btnSave' style="display: none">
							                                      <a  title="Save" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/checkmark2.png" >
							                                      </a>
							                                 </span>
							                                 <span class='btnCancel' style="display: none">
							                                      <a  title="Cancel" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/cross.png" >
							                                      </a>
							                                 </span>
							                            </td>
		      										</tr><?php }?>
											</tbody>
										</table>
						            </div>
								</form>
                            </div>
                      	</div>
                      	<div id="tab3" class="tab_content"> 
                            <div class="load_page">
                            	<form id="validation">
									<div class="tableName toolbar">
										<table class="display data_table2 listProductNoPriceRe" >
											<thead>
												<tr>
													<th><div class="th_wrapp">Tên hàng</div></th>
													<th><div class="th_wrapp">Giá bán</div></th>
													<th><div class="th_wrapp">Số lượng</div></th>
													<th><div class="th_wrapp">Quản lý</div></th>
												</tr>
											</thead>
											<tbody>
											<?php 
												foreach ($list_product_not_price as $item) {
											?>
													<tr class="odd gradeX editWh" id="<?php echo $item['p']['id'].'_edit'?>">
								      					<td><?php  echo $item['p']['name']; ?></td>
								      					<td class='editPrice'><div class='old_price formatMoney'><?php  echo $item['p']['price_retail'];?></div>
								      						<input id="<?php echo $item['p']['id'].'_edit_p'?>" value ="<?php echo $item['p']['price_retail'];?>" class='validate[required,min[1]] tmp_price' style="display: none"/>
								      					</td>
								      					<td><?php  echo $item['p']['quantity_retail'];?></td>
								      					<td >
							                                <span class='btnEdit'>
							                                      <a  title="Edit" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/pencil.png" >
							                                      </a>
							                                 </span> 
							                                 <span class="tip btnDelete" >
							                                       <a title="Delete"  >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/delete.png" >
							                                       </a>
							                                </span> 
							                                <span class='btnSave' style="display: none">
							                                      <a  title="Save" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/checkmark2.png" >
							                                      </a>
							                                 </span>
							                                 <span class='btnCancel' style="display: none">
							                                      <a  title="Cancel" >
							                                           <img src="<?php echo $this->webroot; ?>img/icon/color_18/cross.png" >
							                                      </a>
							                                 </span>
							                            </td>
		      										</tr><?php }?>
											</tbody>
										</table>
						            </div>
								</form>
                            </div>
                      	</div>                  	
                      	</div>
                      </div>
         <div class="clear"/></div>  
	</div>
</div>